
#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n = s.size();
  s = " " + s;
  int left = 0;
  bool flag = true;
  for (int i = 1; i <= n; i++) {
    if (s[i] == '#') {
      flag = !flag;
      if (flag) {
        cout << left << "," << i << endl;
      } else {
        left = i;
      }
    }
  }

  return 0;
}
